import { defineConfig } from 'vite'
import vue from '@vitejs/plugin-vue'
const path = require('path')

// https://vitejs.dev/config/
export default defineConfig({
  plugins: [vue()],
  resolve: {
    alias: {
      '@': path.resolve(__dirname, './src')
    }
  },
  server: {
    https: true, // 是否使用https协议
    proxy: {
      /*'/api': { // 跨域代理，跟webpack的vue.config.js差不多，若有需要可放开根据实际进行配置
        target: 'http://xxx.xxxxx.xxx/',
        changeOrigin: true,
        rewrite: path => path.replace(/^\/api/, '')
      }*/
    }
  }
})
